package com.jack.helloworld.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.jack.helloworld.R;
import com.jack.helloworld.activity.mode.BaseActivity;

public class MainActivity extends BaseActivity implements View.OnClickListener {


    Button btnMain01;
    Button btnMain03;
    Button btnMain04;
    Button btnMain05;
    Button btnMain06;
    Button btnMain07;
    Button btnMain08;
    Button btnMain09;

	Button btnLR1;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_main);
        
        initView();
        initData();
    }

    protected void initView() {
        btnMain01 = (Button) findViewById(R.id.btnMain01);
        btnMain03 = (Button) findViewById(R.id.btnMain03);
        btnMain04 = (Button) findViewById(R.id.btnMain04);
        btnMain05 = (Button) findViewById(R.id.btnMain05);
        btnMain06 = (Button) findViewById(R.id.btnMain06);
        btnMain07 = (Button) findViewById(R.id.btnMain07);
        btnMain08 = (Button) findViewById(R.id.btnMain08);
        btnMain09 = (Button) findViewById(R.id.btnMain09);

	    btnLR1 = (Button) findViewById(R.id.btnLR1);
    }

    protected void initData() {
        btnMain01.setOnClickListener(this);
        btnMain03.setOnClickListener(this);
        btnMain04.setOnClickListener(this);
        btnMain05.setOnClickListener(this);
        btnMain06.setOnClickListener(this);
        btnMain07.setOnClickListener(this);
        btnMain08.setOnClickListener(this);
        btnMain09.setOnClickListener(this);

	    btnLR1.setOnClickListener(this);

    }


    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.btnMain01:
                Intent mainInten = new Intent(this, Main01Activity.class);
                startActivity(mainInten);
                break;
            case R.id.btnMain03:
                mainInten = new Intent(this, Main03Activity.class);
                startActivity(mainInten);
                break;
            case R.id.btnMain04:
                mainInten = new Intent(this, Main04Activity.class);
                startActivity(mainInten);
                break;
            case R.id.btnMain05:
                mainInten = new Intent(this, Main05Activity.class);
                startActivity(mainInten);
                break;
            case R.id.btnMain06:
                mainInten = new Intent(this, Main06Activity.class);
                startActivity(mainInten);
                break;
            case R.id.btnMain07:
                mainInten = new Intent(this, Main07Activity.class);
                startActivity(mainInten);
                break;
            case R.id.btnMain08:
                mainInten = new Intent(this, Main08Activity.class);
                startActivity(mainInten);
                break;
            case R.id.btnMain09:
                mainInten = new Intent(this, Main09Activity.class);
                startActivity(mainInten);
                break;
	
	        case R.id.btnLR1:
		        mainInten = new Intent(this, LR1Activity.class);
		        startActivity(mainInten);
		        break;
        }
    }

}
